
/**
*
* Object representing the visual state of an experience.
* This object implements two methods to standardize the entry and exit
* points of a state. All the properties of a state are set by Experience
* Manager and become available in the create method.
*
* @author	Jovan Alleyne
* @version	1.0
* @since	Flash 9
*
*/

package org.hive.state
{
	import flash.events.EventDispatcher;
	import flash.events.Event;
	
	import org.hive.sequence.*;
	import org.hive.managers.*;
	import org.hive.data.ContentList;
		
	public class State extends EventDispatcher
	{
        /**
		* XML based datasource instance of ContentList.
		*/
		public var contentList		: *;
        /**
		* Repository for accessing sequences that have been executed.
		*/
		public var sequencer		: Sequencer;
        /**
		* Instance of LayoutManager for access to stage properties and display list
        * operations.
		*/
		//public var layoutManager	: LayoutManager;
        /**
		* Instance of LoadManager to load external media.
		*/
		//public var loadManager		: LoadManager;
        /**
		* Instance of SoundManager to control audio.
		*/
		//public var soundManager		: SoundManager;
        /**
		* Instance of VideoManager to control video playback.
		*/
		//public var videoManager		: VideoManager;
        /**
		* Reference to the previous display state of the experience.
		*/
		public var previousState	: State = null;
        /**
		* Reference to the event which caused the state change.
		*/
		public var trigger			: Event = null;
		
        /**
		* Method that runs when a state is instanciated. This is designed
        * to be the entry point to a state. An ActionSequnce object
        * should be returned describing the animation this state describes.
		*
		* @see		close
        * @see      ActionSequence
		*/
		public function create( ):ActionSequence
        {
			return null;
		}

        /**
		* This method is called when a state has been changed. A CloseSequence
        * object is returned to animate out and onscreen elements that do
        * not need to be transfered to the next state.
		*
        * @see		create
		* @see		CloseSequence
		*/
        public function close( ):CloseSequence
        {
            return null;
        }
	}
}